Skip to content

Instantly share code, notes, and snippets.

@prabirshrestha
prabirshrestha / .bash_profile
Last active May 19, 2024 08:06
my terminal settings for windows
# curl -Lk https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.bash_profile -o ~/.bash_profile
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh # This loads NVM
export PATH="$HOME/.cargo/bin:$HOME/go/bin:$HOME/Library/Python/3.7/bin:$PATH"
export PATH="$HOME/.config/nvim/plugins/vim-themis/bin:$PATH"
stty -ixon
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
@dhh
dhh / linux-setup.sh
Last active May 19, 2024 08:05
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl btop \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@niteria
niteria / slim.hs
Created May 12, 2013 22:12
parsing binary data in haskell
module Main where
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Data.Binary.Strict.Get
import qualified Data.Binary.Strict.BitGet as BG
import Data.Word
import Control.Monad
import Control.Applicative
import Data.Binary.Put
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 19, 2024 07:58
Swift Concurrency Manifesto
@kalomaze
kalomaze / modeling_mixtral.py
Created May 5, 2024 03:38
Fixed Mixtral training code for HF Transformers
# coding=utf-8
# Copyright 2023 Mixtral AI and the HuggingFace Inc. team. All rights reserved.
#
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
# and OPT implementations in this library. It has been modified from its
# original forms to accommodate minor architectural differences compared
# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@edgar-bonet
edgar-bonet / interpreter.ino
Last active May 19, 2024 07:52
Simple Arduino command line interpreter
/*
* interpreter.ino: Simple Arduino command line interpreter.
*
* This is intended solely as a template for building richer,
* application-specific interpreters. Add your specific commands to the
* exec() function, and whatever you need to setup() and loop().
*
* Usage:
* Talk to it through the serial port at 9600/8N1. Commands should be
* terminated by CR (\r), answers are terminated by CRLF (\r\n). This
@ckandoth
ckandoth / single_machine_slurm_on_ubuntu.md
Last active May 19, 2024 07:49
Install Slurm 19.05 on a standalone machine running Ubuntu 20.04

Use apt to install the necessary packages:

sudo apt install -y slurm-wlm slurm-wlm-doc

Load file:///usr/share/doc/slurm-wlm/html/configurator.html in a browser (or file://wsl%24/Ubuntu/usr/share/doc/slurm-wlm/html/configurator.html on WSL2), and:

  1. Set your machine's hostname in SlurmctldHost and NodeName.
  2. Set CPUs as appropriate, and optionally Sockets, CoresPerSocket, and ThreadsPerCore. Use command lscpu to find what you have.
  3. Set RealMemory to the number of megabytes you want to allocate to Slurm jobs,
  4. Set StateSaveLocation to /var/spool/slurm-llnl.
  5. Set ProctrackType to linuxproc because processes are less likely to escape Slurm control on a single machine config.
@nntrn
nntrn / espn-api-list.md
Last active May 19, 2024 07:49
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

  • June 2021 - list of endpoints for other sports/leagues (i.e. basketball, baseball, lacrosse, rugby)
  • August 2021 - get historical fantasy league data
  • September 2021 - list of endpoints in plain text
  • May 2023 - collapsed endpoint response examples

Additional Resources